package com.aaa.phone.controller.lovecarrecyclecontroller;

import com.aaa.phone.service.lovecarrecycleservice.LoveCarRecycleService;
import com.aaa.web.commons.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;
/**
* @description:手机爱车回收Controller层
* @author: 王林林
* @create: 2018/12/17 10:15
**/
@RestController
@CrossOrigin
@RequestMapping("/recycle")
public class LoveCarRecycleController {

    @Autowired
    private LoveCarRecycleService service;


    /*获取所有车型*/
    @RequestMapping("/getType")
    public List<Map> getType(){
        return service.getType();
    }

    /*根据手机号获取当前账户所有车辆出厂号*/
    @RequestMapping("/getCarCode")
    public List<Map> getCarCode(String telephone){
        //System.out.println(telephone);
        return service.getCarCode(telephone);
    }

    /*添加车辆回收信息*/
    @RequestMapping("/addRecycleInfo")
    public Result addRecycleInfo(String carcode, String telephone){
        //System.out.println(carcode);
        return service.addRecycleInfo(carcode, telephone);
    }
}
